Add prototype for balloon_init_watcher.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 2 Aug 2005 19:04:13 +0000 (19:04 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 2 Aug 2005 19:04:13 +0000 (19:04 +0000)
Also cleanup balloon_init_watcher whitespace.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
linux-2.6-xen-sparse/include/asm-xen/balloon.h

index 2b4b7e992f01d21412a311c180e7103a693fc44f..ba1e38a7703de3a862eb0e82197d67bef9b9150e 100644 (file)
@@ -84,9 +84,6 @@ static struct timer_list balloon_timer;
 /* Flag for dom0 xenstore workaround */
 static int balloon_xenbus_init=0;
 
-/* Init Function */
-void balloon_init_watcher(void);
-
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 /* Use the private and mapping fields of struct page as a list. */
 #define PAGE_TO_LIST(p) ( (struct list_head *)&p->private )
@@ -354,27 +351,21 @@ static void watch_target(struct xenbus_watch *watch, const char *node)
     
 }
 
-/* 
-   Try to set up our watcher, if not already set
-   
-*/
-void balloon_init_watcher(void) 
+/* Init Function - Try to set up our watcher, if not already set. */
+void balloon_init_watcher(void)
 {
     int err;
 
-    if(!xen_start_info.store_evtchn)
-    {
+    if (!xen_start_info.store_evtchn) {
         IPRINTK("Delaying watcher init until xenstore is available\n");
         return;
     }
 
     down(&xenbus_lock);
 
-    if(! balloon_xenbus_init) 
-    {
+    if (!balloon_xenbus_init) {
         err = register_xenbus_watch(&xb_watch);
-        if(err) 
-        {
+        if (err) {
             /* BIG FAT FIXME: dom0 sequencing workaround
              * dom0 can't set a watch on memory/target until
              * after the tools create it.  So, we have to watch
@@ -384,16 +375,13 @@ void balloon_init_watcher(void)
              * non-existant keys
              */
             register_xenbus_watch(&root_watch);
-        } 
-        else
-        {
+        } else {
             IPRINTK("Balloon xenbus watcher initialized\n");
             balloon_xenbus_init = 1;
         }
     }
 
     up(&xenbus_lock);
-
 }
 
 EXPORT_SYMBOL(balloon_init_watcher);
index 2787ee81748bdd1ce28ca95dbcff4680b7e5cc96..d440618f2d7a7e9ab695c308013e840a6d64ea5c 100644 (file)
@@ -29,6 +29,7 @@
 
 #include <asm-xen/hypervisor.h>
 #include <asm-xen/xenbus.h>
+#include <asm-xen/balloon.h>
 #include <linux/kernel.h>
 #include <linux/err.h>
 #include <linux/string.h>
index 80ef4acefc3d4714aa743714a3bc8c7189d2767a..413919b3226f25698d0562eee07f887983d46f2d 100644 (file)
@@ -48,4 +48,7 @@ extern spinlock_t balloon_lock;
 #define balloon_lock(__flags)   spin_lock_irqsave(&balloon_lock, __flags)
 #define balloon_unlock(__flags) spin_unlock_irqrestore(&balloon_lock, __flags)
 
+/* Init Function - Try to set up our watcher, if not already set. */
+void balloon_init_watcher(void);
+
 #endif /* __ASM_BALLOON_H__ */